package com.leyou.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 *
 * @author: wangzibeng
 * Date: 2019/4/28 0028
 * Time: 14:10
 */
@Data
@ConfigurationProperties(prefix = "ly.cors")
public class CorsProperties {
    /**
     * 允许的域
     */
    private List<String> allowedOrigins;
    /**
     * 是否发送Cookie信息
     */
    private Boolean allowCredential;
    /**
     * 允许的请求方式
     */
    private List<String> allowedMethods;
    /**
     * 允许的头信息
     */
    private List<String> addAllowedHeaders;
    /**
     * 配置有效期
     */
    private Long maxAge;
    /**
     * 添加映射路径，我们拦截一切请求
     */
    private String filterPath;
}
